<admintpl file="header" />
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:U('Activity/index')}">活动列表</a></li>
			<li><a href="{:U('Activity/add')}">添加活动</a></li>
		</ul>
		<form class="well form-search" method="post" action="{:U('Activity/index')}">
			活动标题:
			<input type="text" name="activity_title" style="width: 130px;" value="{:I('request.activity_title/s','')}" placeholder="请输入活动标题">
			品牌分类：
			<select name="activity_brand_type" aria-invalid="false" style="width: 150px;">
				<option value="" <if condition="$activity_brand_type eq ''">selected</if>>请选择</option>
				<option value="1"  <if condition="$activity_brand_type eq '1'">selected</if>>品牌</option>
				<option value="2"  <if condition="$activity_brand_type eq '2'">selected</if>>商户</option>
				<option value="3"  <if condition="$activity_brand_type eq '3'">selected</if>>联合</option>
			</select>
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-danger" href="{:U('Activity/index')}">清空</a>
		</form>
		<table class="table table-hover table-bordered">
			<thead>
				<tr>
					<th width="50">ID</th>
					<th>活动标题</th>
					<th>活动简介</th>
					<th>活动时间</th>
					<th>小图标</th>
					<th>活动地点</th>
					<th>品牌分类</th>
					<th>商户ID</th>
					<th>活动分类</th>
					<th width="50">{:L('STATUS')}</th>
					<th width="100">{:L('ACTIONS')}</th>
				</tr>
			</thead>
			<style>td{word-break:break-all;}</style>
			<tbody>
				<php>
					 $activity_brand_type=array("1"=>"品牌","2"=>"商户",3=>"联合");
					 $activity_type=array("1"=>"首页活动","2"=>"优惠活动");
				     $activity_statuses=array("N"=>"禁用","Y"=>"启用");
				</php>
				<foreach name="list" item="vo">
				<tr>
					<td>{$vo.id}</td>
					<td>{$vo.activity_title}</td>
					<td>{$vo.activity_intro}</td>
					<td>{$vo.activity_start_time}-{$vo.activity_end_time}</td>
					<td><a href="<php>echo '/'.C('UPLOADPATH').$vo['activity_icon']</php>" target="_blank">点击查看</a></td>
					<td>{$vo.activity_address}</td>
					<td>{$activity_brand_type[$vo['activity_brand_type']]}</td>
					<td>{$vo.merchant_id}</td>
					<td>{$activity_type[$vo['activity_type']]}</td>
					<td>{$activity_statuses[$vo['activity_status']]}</td>
					<td>
						<a href='{:U("Activity/edit",array("id"=>$vo["id"]))}'>{:L('EDIT')}</a> |
						<a class="js-ajax-delete" href="{:U('Activity/delete',array('id'=>$vo['id']))}">{:L('DELETE')}</a>
					</td>
				</tr>
				</foreach>
			</tbody>
		</table>
		<div class="pagination">{$page}</div>
	</div>
	<script src="__PUBLIC__/js/common.js"></script>
</body>
</html>